
package com.lczyfz.campusinfo.modules.sys.security;

/**
 * 用户和密码（包含验证码）令牌类
 * @author ThinkGem
 * @version 2013-5-19
 */
public class UsernamePasswordToken extends org.apache.shiro.authc.UsernamePasswordToken {

	private static final long serialVersionUID = 1L;

    // TODO 设置用户类型 type
    private String type;

	private String captcha;
	private boolean mobileLogin;

    public UsernamePasswordToken(String username, String password, String type) {
        super(username, password);
        this.type = type;
    }

	public UsernamePasswordToken(String username, char[] password,
                                 boolean rememberMe, String host, String captcha, boolean mobileLogin) {
        super(username, password, rememberMe, host);
		this.captcha = captcha;
		this.mobileLogin = mobileLogin;
	}

    // TODO 带用户类型 type 的构造器
    public UsernamePasswordToken(String username, char[] password,
                                 String type, boolean rememberMe, String host, String captcha, boolean mobileLogin) {
        super(username, password, rememberMe, host);
        this.type = type;
        this.captcha = captcha;
        this.mobileLogin = mobileLogin;
    }

	public String getCaptcha() {
		return captcha;
	}

	public void setCaptcha(String captcha) {
		this.captcha = captcha;
	}

	public boolean isMobileLogin() {
		return mobileLogin;
	}

    // TODO
    public String getType() {
        return type;
    }

    //TODO
    public void setType(String type) {
        this.type = type;
    }
}